import createUserApi from '@/apis/user'
import createArticleApi from '@/apis/article'
import createTagApi from '@/apis/tag'
import createTypeApi from '@/apis/type'
import createCommentApi from '@/apis/comment'

export default ({ $axios }, inject) => {
  const repositories = {
    user: createUserApi($axios)('/blog'),
    article: createArticleApi($axios)('/blog/article'),
    tag: createTagApi($axios)('/blog/tag'),
    type: createTypeApi($axios)('/blog/type'),
    comment: createCommentApi($axios)('/blog/comment'),
  }

  inject('API', repositories)
}
